package com.openvas.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.openvas.mapper.TableScannerMapper;
import com.openvas.domain.TableScanner;
import com.openvas.service.ITableScannerService;
import com.openvas.commons.common.core.text.Convert;

/**
 * 扫描仪Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-11-04
 */
@Service
public class TableScannerServiceImpl implements ITableScannerService 
{
    @Autowired
    private TableScannerMapper tableScannerMapper;

    /**
     * 查询扫描仪
     * 
     * @param scannerId 扫描仪主键
     * @return 扫描仪
     */
    @Override
    public TableScanner selectTableScannerByScannerId(String scannerId)
    {
        return tableScannerMapper.selectTableScannerByScannerId(scannerId);
    }

    /**
     * 查询扫描仪列表
     * 
     * @param tableScanner 扫描仪
     * @return 扫描仪
     */
    @Override
    public List<TableScanner> selectTableScannerList(TableScanner tableScanner)
    {
        return tableScannerMapper.selectTableScannerList(tableScanner);
    }

    /**
     * 新增扫描仪
     * 
     * @param tableScanner 扫描仪
     * @return 结果
     */
    @Override
    public int insertTableScanner(TableScanner tableScanner)
    {
        return tableScannerMapper.insertTableScanner(tableScanner);
    }

    /**
     * 修改扫描仪
     * 
     * @param tableScanner 扫描仪
     * @return 结果
     */
    @Override
    public int updateTableScanner(TableScanner tableScanner)
    {
        return tableScannerMapper.updateTableScanner(tableScanner);
    }

    /**
     * 批量删除扫描仪
     * 
     * @param scannerIds 需要删除的扫描仪主键
     * @return 结果
     */
    @Override
    public int deleteTableScannerByScannerIds(String scannerIds)
    {
        return tableScannerMapper.deleteTableScannerByScannerIds(Convert.toStrArray(scannerIds));
    }

    /**
     * 删除扫描仪信息
     * 
     * @param scannerId 扫描仪主键
     * @return 结果
     */
    @Override
    public int deleteTableScannerByScannerId(String scannerId)
    {
        return tableScannerMapper.deleteTableScannerByScannerId(scannerId);
    }
}
